Skip to content

rework enclave contract to better support multiple accepted measurements#166

Open
daltoncoder wants to merge 21 commits intoseismicfrom
enclave-contract/list-all-accepted
Open

rework enclave contract to better support multiple accepted measurements#166
daltoncoder wants to merge 21 commits intoseismicfrom
enclave-contract/list-all-accepted

Conversation

@daltoncoder
Copy link
Contributor

@daltoncoder daltoncoder commented Oct 20, 2025

I switched around UpgradeOperator.sol to be able to handle supporting multiple accepted TD measurements at one time. My main concern was with the previous way was it was hard to tell what was currently supported without knowing the hash of the measurements. And we had to create a new Struct everytime we needed to add pcr we cared about in the measurements.

Main Changes:

  • Replaced the DefiningAttributesV2 and V1 structs with a single Measurement struct. This struct has a registrar_slots and registrar_values field. The former is which pcr registrars we care about and the latter is the value, aligned by index. This will allow our different supported measurements to care about different pcr registrars which i think will be the case with our azure vs bare metal measurements
  • Added some storage slots bytes32[] public acceptedTags; and bytes32[] public deprecatedTags; that make it easy to get all currently accepted measurements and previously deprecated measurements
  • reworked pretty much everything else to align with this
  • wrote the unit tests in solidty

Still Todo before this PR is ready:

  • Fix our previous rust based tests for the old version. Maybe able to remove them now that we have solidity unit tests but ill have to fix up our integration test script as it looks for the rust test binary to run.
    Ready

@daltoncoder daltoncoder requested a review from cdrappi as a code owner October 20, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants